const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  chainWebpack: config => {
    const svgRule = config.module.rule('svg')
    svgRule.uses.clear()
    svgRule
      .test(/\.svg$/)
      .use('svg-sprite-loader')
      .loader('svg-sprite-loader')
  },
  productionSourceMap: false,
  transpileDependencies: true,
  lintOnSave: false,
  runtimeCompiler: true,
  devServer: {
    // development server port 8000
    port: 8080, //端口  
    proxy: {
      '/api2': {
        target: 'http://101.42.99.134:9002/pmqt',
        changeOrigin: true,
        pathRewrite: {
          '^/api2': ''
        }
      },
    },
    // overlay: {
    //   warnings: false,
    //   errors: true
    // }
  }

})
